home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / desktop / wininit.zip / WININIT.DOC < prev    next >
Text File  |  1991-08-08  |  5KB  |  113 lines

  1.  
  2.  
  3.  
  4.  
  5.                  WinInit
  6.                  -------
  7.  
  8.                    by
  9.                    Tom Roberts
  10.  
  11.         WinInit will initialize the Windows 3.0 desktop
  12.         from a list of applications and window sizes read
  13.         from WIN.INI.  Application windows will be moved
  14.         to the specified position and size on the screen,
  15.         and shown or iconized, as specified.
  16.  
  17.         Copyright (C) 1991, by Tom Roberts. All rights reserved.
  18.         This program may be freely distributed by electronic or
  19.         other means, as long as this copyright notice is preserved.
  20.  
  21.               Version 1.0,  August 6, 1991
  22.  
  23.  
  24. WinInit is a simple Windows application to set up the initial desktop based
  25. upon a list of applications and window sizes read from WIN.INI.  WinInit is
  26. expected to be executed only during Windows initialization, though it can
  27. be executed at any time.  In keeping with its simplicity, WinInit must be
  28. manually installed, including manual editing of WIN.INI.
  29.  
  30.  
  31.                  INSTALLATION
  32.                  ------------
  33.  
  34. To install WinInit, first copy the WININIT.EXE file to a convenient
  35. directory within Windows' PATH; the directory \WINDOWS may be used.
  36. In these instructions, \WINDOWS is assumed.
  37.  
  38. Next, WIN.INI must be edited. This may be done using any text editor,
  39. including Windows Clipboard or System Editor.  WIN.INI is normally located
  40. in the \WINDOWS directory (the System Editor will always find it for you).
  41. WIN.INI is divided into sections separated by lines of the form:
  42.  
  43.     [section-name]        (starts in Column 1)
  44.  
  45. Find the [windows] section; it is usually first. Look for two lines:
  46.  
  47.     load=            (possibly followed by a list of programs)
  48.     run=            (possibly followed by a list of programs)
  49.  
  50. Delete the list of programs on each of these lines, and add WININIT.EXE
  51. to one of them (use D:\path\WININIT.EXE, if necessary):
  52.  
  53.     load=WININIT.EXE    (Program Manager will appear normally)
  54.     OR
  55.     run=WININIT.EXE        (Program Manager will appear as an icon)
  56.  
  57. NOTE: WININIT.EXE should appear ONLY ONCE in the "load=" and "run=" lines;
  58. the other line should not contain any programs.  The choice of which line
  59. to use will determine how the Program Manager window is displayed during
  60. Windows startup, as described above.  Basically, WinInit gives you better
  61. control over the automatic startup of Windows applications; it replaces
  62. the functionality of these two lines in WIN.INI.
  63.  
  64. Now move to the END of WIN.INI.  Add the following lines:
  65.  
  66.     [WinInit]        (start in column 1)
  67.     win1=1 0 0 250 300 clock.exe
  68.  
  69. The first line introduces the section for WinInit.  The second line tells
  70. WinInit to execute clock.exe, move it to a window with origin (0,0) and
  71. size (250,300) [units are pixels], and show it with ShowWindow state 1
  72. (which is SW_SHOWNORMAL - i.e. a normal window).
  73.  
  74. Save the file WIN.INI to disk, and restart Windows.  Windows should start up,
  75. and display the clock in the upper left corner of the screen.  The Program
  76. Manager window should also appear, icon or normal, as selected above.
  77.  
  78. If all is well, you can re-edit WIN.INI, placing whatever programs you wish
  79. into the WinInit section of WIN.INI.  The format of WinInit lines is (note
  80. that "[]" indicate optional items - DO NOT type the brackets):
  81.  
  82.     win1 = Start X Y Dx Dy [D:\path\]command.exe [arguments]
  83.  
  84. Where:
  85.  
  86.     win1        indicates the window to WinInit: win1 - win63.
  87.     Start        indicates the initial ShowWindow status:
  88.                 1=normal, 2=icon
  89.     X        is the X coordinate of the upper left corner, pixels.
  90.     Y        is the Y coordinate of the upper left corner, pixels.
  91.                 (0,0) is the upper left corner of the screen;
  92.                 X increases to the right, Y increases down.
  93.     Dx, Dy        are the size of the window, in pixels.
  94.     command.exe     (plus optional drive and path) is the command.
  95.             NOTE: You can use normal DOS .EXE and .COM programs,
  96.             as well as Windows applications and .PIF files;
  97.             DOS programs will only start up as icons, even if
  98.             Start is 1.  Windows will follow the DOS %PATH% to
  99.             find the file. The extension, however, MUST be given.
  100.     arguments     are the optional arguments for the command.
  101.  
  102. Commands will be executed in numerical order, not necessarily the order they
  103. appear in WIN.INI.
  104.  
  105. Note that unless the command is a .PIF file, Windows will set its current
  106. directory to be the directory in which the program was found; this may help
  107. avoid using absolute pathnames in the arguments.  For .PIF files, Windows
  108. uses the Start-up Directory field from the .PIF file.
  109.  
  110. WinInit can be executed at any time; it will read WIN.INI and launch the
  111. programs listed, and then exit.  As this is rarely (if ever) used, WinInit
  112. has no icon of its own.
  113.